home *** CD-ROM | disk | FTP | other *** search
- Path: su3.in.net!news
- From: poundss@in.net (Sam Pounds)
- Newsgroups: comp.lang.c
- Subject: Pointer Conversion
- Date: Sun, 21 Jan 1996 01:38:28 GMT
- Organization: INTERNET Indiana
- Message-ID: <4ds4jq$fo4@su3.in.net>
- NNTP-Posting-Host: pm1-05.in.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- I am having a problem with a "string concatenate" function.
- When I compile my little program it works, but I get a
- "suspicious pointer" conversion warning. The function is
- below and I call it with two strings that I want to concatenate.
-
- char *my_strcat(const char *a, const char *b)
- {
- char done[1024];
- char *p = done;
-
- while (*a)
- *p++ = *a++;
- while (*b)
- *p++ = *b++;
- *p = '\0';
- return done; /* this is the suspicious pointer conversion error */
- }
-
- I'm sure someone can explain this to me.
- Thanks in advance.
-
-
-
-